import request from '@/utils/request';

/**
 * @description 用户登录
 * @param {string}  username
 * @param {string}  password
 * @returns {string} token
 */

export const login = (type, data) => {
    return request.post(`/sys/~${type}~/user/login`, data);
    // return request.post('/user/login', data);
};

/**
 * @description 用户退出登录
 * @returns {string}
 */

export const logout = data => {
    return request.post('/sys/user/logout', data);
};

/**
 * 用户重置密码
 */
export const resetPassword = data => {
    return request.post('/sys/user/password/reset', data);
};

/**
 * 用户更新密码
 */
export const updateUserPwd = data=>{
    return request.post('',data)
}